import { Entity, PrimaryGeneratedColumn, Column, OneToOne, JoinColumn } from "typeorm";
import { ContractEntity } from "./contract.entity";

@Entity({
  name: "signed_contracts"
})
export class SignedContractsEntity {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({name: "user_id"})
  userId: number;

  @Column({name: "contract_id"})
  contractId: number;

  @Column({name: "contract_type"})
  contractType: number;

  @OneToOne(() => ContractEntity)
  @JoinColumn({name:'contract_id'})
  contract: ContractEntity
}
